Level=Core.class(Sprite)

local background=Sprite.new()
 layerBack=Layer.new()
 layerCenter=Layer.new()
 layerLand=Layer.new()
 layerFront=Layer.new()

function Level:init()
	
	self:addChild(layerBack)
	self:addChild(layerCenter)
	self:addChild(layerLand)
	self:addChild(layerFront)
end

function Level:addBackGround(image)
	background=Bitmap.new(Texture.new(image))
	
	local originalWidth = background:getWidth()
	
	local originalHeight = background:getHeight()
	background:setScale(application:getDeviceWidth() / originalHeight, application:getDeviceWidth() / originalHeight)
	
	self:addChildAt(background,1)
end
